# coding: gb2312

def main():
    with open('chinese.txt', 'r', encoding='gb2312') as f:
        lines = f.readlines()

    hanzi_list = []
    for line in lines:
        if '/*' in line and '*/' in line:
            hanzi = line.split('/*')[1].split(',')[0].replace('"', '').strip()
            hanzi_list.append(hanzi)

    i = 0
    print('chinese_ctrl_t chinese_table[] = {')
    for i, hanzi in enumerate(hanzi_list):
        print(f'    "{hanzi}", chinese_3232[{i*6}],')
        i += 1
    print('}; ')
    print(i)

if __name__ == '__main__':
    main()
